<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    //keys  values entirs
    let web={
        name:"唐玮",
        age:25
    };
    // console.log(Object.keys(web));
    // console.log(Object.values(web));
    console.log(Object.entries(web));
    // console.log(Object.entries(web)[0]);
    for (const key in web) {
      console.log(web[key]);  //在数组的时候 for in 是序号，在对象的时候。这里是对象的属性名字
    }

   for (const iterator of Object.entries(web)) {
       console.log(iterator);
   }

    </script>
</body>
</html>